<?php // classes.php -- Defines the Lab and Printer classes

class Lab {
	
	// Define our instance fields

	public $name = '';
	public $location = '';
	public $string_rep = '';
	public $url = '';
	public $phone_number = '';
	public $open_status = FALSE;
	public $always_open = FALSE;
	// public $picture;

	// Define the constructor method

	public function __construct($lab_name, $lab_location, $lab_string_rep,
			    	    $lab_url, $lab_phone_number, $lab_open_status) {
		$this->name = $lab_name;
		$this->location = $lab_location;
		$this->string_rep = $lab_string_rep;
		$this->url = $lab_url;
		$this->phone_number = $lab_phone_number;
		$this->open_status = $lab_open_status;
		}

	// Define our 'getter' methods

	public function get_name() {
		return $this->name;
	}
	
	public function get_location() {
		return $this->location;
	}

	public function get_string_rep() {
		return $this->string_rep;
	}

	public function get_url() {
		return $this->url;
	}

	public function get_phone_number() {
		return $this->phone_number;
	}

	public function get_open_status() {
		return $this->open_status;
	}

	// Define a getter and setter method for "always open" status

	public function set_always_open_status($lab_always_open_status) {
		$this->always_open = $lab_always_open_status;
	}

	public function get_always_open_status() {
		return $this->always_open;
	}
}

// Define the Printer class

class Printer {
	
	// Define our instance fields

	public $name = '';
	public $location = '';
	public $string_rep = '';
	public $url = '';
	public $lab= ''; // The lab in which the printer resides, if any
	public $toner_level = '';
	public $open_status = FALSE;
	public $always_open = FALSE;

	// Define the constructor

	public function __construct() {
		}

	// Define our setter methods

	public function set_name($printer_name) {
		$this->name = $printer_name;
	}
	
	public function set_location($printer_location) {
		$this->location = $printer_location;
	}

	public function set_string_rep($printer_string_rep) {
		$this->string_rep = $printer_string_rep;
	}

	public function set_url($printer_url) {
		$this->url = $printer_url;
	}

	public function set_lab($printer_lab) {
		$this->lab = $printer_lab;
	}

	public function set_toner_level($printer_toner_level) {
		$this->toner_level = $printer_toner_level;
	}

	public function set_open_status($printer_open_status) {
		$this->open_status = $printer_open_status;
	}
	
	public function set_always_open_status($printer_always_open_status) {
		$this->always_open = $printer_always_open_status;
	}

	// Define our 'getter' methods

	public function get_name() {
		return $this->name;
	}
	
	public function get_location() {
		return $this->location;
	}

	public function get_string_rep() {
		return $this->string_rep;
	}

	public function get_url() {
		return $this->url;
	}

	public function get_lab() {
		return $this->lab;
	}

	public function get_toner_level() {
		return $this->toner_level;
	}

	public function get_open_status() {
		return $this->open_status;
	}

	public function get_always_open_status() {
		return $this->always_open;
	}
}

?>

